package com.epi.basic.model;

/**
 * @author dxy
 * @version 1.0
 */

public enum ErrorCode implements StatusDetail{
    BAD_REQUEST(400,"Bad request"),
    UN_AUTHORIZED(401,"not authorized"),
    FORBIDDEN(403,"have no permission"),
    TIME_OUT(408,"Time out");

    private final Integer errorCode;
    private final String errorMsg;

    ErrorCode(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public String getMsg() {
        return errorMsg;
    }

    @Override
    public Integer getCode() {
        return errorCode;
    }
}
